home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-01 / lcppb.zip / LCPPANS.ZIP / COUNTS.CPP < prev    next >
C/C++ Source or Header  |  1991-07-08  |  648b  |  24 lines

  1. // counts.cpp -- Test effects of ++ and --
  2.  
  3. #include <iostream.h>
  4.  
  5. main()
  6. {
  7.   int count = 98;
  8.  
  9.   cout << "At start, count = " << count;
  10.   cout << "\ncount++ = " << count++ << "; count = " << count;
  11.   cout << "\n++count = " << ++count << "; count = " << count;
  12.   cout << "\ncount-- = " << count-- << "; count = " << count;
  13.   cout << "\n--count = " << --count << "; count = " << count;
  14.   cout << "\nfinal count = " << count;
  15. }
  16.  
  17.  
  18. // Copyright (c) 1990 by Tom Swan. All rights reserved
  19. // Revision 1.00    Date: 10/23/1990   Time: 04:35 pm
  20.  
  21. // Revision 1.01    Date: 07/08/1991   Time: 05:41 pm
  22. // Converted for Borland C++ 2.0
  23.  
  24.